package com.example.oj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.oj.entity.Submit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author lenovo131
 * @description 针对表【submit(题目提交)】的数据库操作Mapper
 * @createDate 2023-10-26 09:30:28
 * @Entity com.example.oj.model.entity.Submit
 */
@Mapper
public interface SubmitMapper extends BaseMapper<Submit> {

  //根据用户id和题目id获取用户在最近一次提交,如果该提交还未执行结束,不允许继续提交
  public Integer getNotFinish(@Param("questionId") Long questionId,@Param("userId") Long userId);

  public void updateStateById(Long id);
}




